<!DOCTYPE html>
<html>
<head>
    <title>修改审批表信息页面</title>
<#include "../common/common.ftl"/>
    <link rel="stylesheet" href="/style/contractForm.css" media="all">
</head>
<body>
<div class="layui-fluid">
    <form class="layui-form" id="setSpForm">
        <input type="hidden" name="contractId" value="${(contract.id)!}"/>
        <div class="layui-card">
            <div class="layui-card-header">修改审批表信息页面</div>
            <div class="layui-card-body">

                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        被动迁人：${(contract.name)!}
                    </div>
                    <div class="layui-col-xs6">
                        协议号：${(contract.contractCode)!}
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        身份证号：${(contract.idCard)!}
                    </div>
                    <div class="layui-col-xs6">
                        选房号：${(contract.chooseHouseNum)!}
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">被动迁人现状情况：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off"
                                       style="width: 200px;"
                                       name="isLive" value="${(contract.isLive)!}"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">配偶(共有人)：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" style="width: 260px;"
                                       name="spouseName" value="${(contract.spouseName)!}"/>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">配偶(共有人)现状情况：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off"
                                       style="width: 200px;"
                                       name="spouseIsLive" value="${(contract.spouseIsLive)!}"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">配偶(共有人)身份证号：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" style="width: 260px;"
                                       name="spouseIdCard" value="${(contract.spouseIdCard)!}"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">合并到安置区：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off"
                                       name="toAzProjectName" value="${(contract.toAzProjectName)!}"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">产权自持面积：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="propertyAreaBySelf"
                                       value="${(contract.propertyAreaBySelf)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>

                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">产权赠与面积：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="propertyAreaByGift"
                                       value="${(contract.propertyAreaByGift)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">产权被继承面积：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="propertyAreaByInherit"
                                       value="${(contract.propertyAreaByInherit)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <button style="display: none;" class="layui-btn" id="submitBtn" name="submitBtn" lay-submit=""
                    lay-filter="submit">立即提交
            </button>
    </form>
</div>
<script src="/layui/layui.js" charset="utf-8"></script>
<script>
    layui.config({
        base: '/modules/' //静态资源所在路径
    }).use(['form', 'dataDict'], function () {
        var form = layui.form, $ = layui.jquery, parentIndex = parent.layer.getFrameIndex(window.name);

        //监听提交
        form.on('submit(submit)', function (data) {
            $.ajax({
                url: 'saveSpForm',
                type: 'post',
                data: $("#setSpForm").serialize(),//当前容器的全部表单字段，名值对形式：{name: value}
                async: false,
                success: function (data) {
                    if (data.code == "0001") {
                        parent.layer.close(parentIndex);
                    } else {
                        layer.msg(data.message, {anim: 6, icon: 2, time: 3000});
                    }
                }
            });
            return false;
        });
    });
</script>
</body>
</html>